#ifndef DATA_H
#define DATA_H

#include<iostream>

//EXT_GAME_STATUS 0x0001
typedef struct
{
	uint8_t game_type : 4;
	uint8_t game_progress : 4;
	uint16_t stage_remain_time;
	uint64_t SyncTimeStamp;
} ext_game_status_t;

//EXT_GAME_RESULT 0x0002
typedef struct
{
	uint8_t winner;
} ext_game_result_t;


//EXT_EVENT_DATA 0x0101
typedef struct
{
	uint32_t event_type;
} ext_event_data_t;

//EXT_SUPPLY_PROJECTILE_ACTION 0x0102
typedef struct
{
	uint8_t supply_projectile_id; 
	uint8_t supply_robot_id; 
	uint8_t supply_projectile_step; 
	uint8_t supply_projectile_num;
} ext_supply_projectile_action_t;

//EXT_REFEREE_WARNING 0x0104
typedef struct
{
	uint8_t level;
	uint8_t foul_robot_id; 
} ext_referee_warning_t;

//EXT_GAME_ROBOT_STATUS 0x0201
typedef struct
{
	uint8_t robot_id;
	uint8_t robot_level;
	uint16_t remain_HP;
	uint16_t max_HP;
	uint16_t shooter_id1_17mm_cooling_rate;
	uint16_t shooter_id1_17mm_cooling_limit;
	uint16_t shooter_id1_17mm_speed_limit;
	uint16_t shooter_id2_17mm_cooling_rate;
	uint16_t shooter_id2_17mm_cooling_limit;
	uint16_t shooter_id2_17mm_speed_limit;
	uint16_t shooter_id1_42mm_cooling_rate;
	uint16_t shooter_id1_42mm_cooling_limit;
	uint16_t shooter_id1_42mm_speed_limit;
	uint16_t chassis_power_limit;
	uint8_t mains_power_gimbal_output : 1;
	uint8_t mains_power_chassis_output : 1;
	uint8_t mains_power_shooter_output : 1;
} ext_game_robot_status_t;

//EXT_POWER_HEAT_DATA 0x0202
typedef struct
{
	uint16_t chassis_volt; 
	uint16_t chassis_current; 
	float chassis_power; 
	uint16_t chassis_power_buffer; 
	uint16_t shooter_id1_17mm_cooling_heat;
	uint16_t shooter_id2_17mm_cooling_heat;
	uint16_t shooter_id1_42mm_cooling_heat;
} ext_power_heat_data_t;

//EXT_GAME_ROBOT_POS 0x0203
typedef struct
{
	float x;
	float y;
	float z;
	float yaw;
} ext_game_robot_pos_t;

//EXT_BUFF 0x0204
typedef struct
{
	uint8_t power_rune_buff;
}ext_buff_t;

//EXT_ROBOT_HURT 0x0206
typedef struct
{
	uint8_t armor_id : 4;
	uint8_t hurt_type : 4;
} ext_robot_hurt_t;

//EXT_SHOOT_DATA 0x0207
typedef struct
{
	uint8_t bullet_type;
	uint8_t shooter_id;
	uint8_t bullet_freq;
	float bullet_speed;
} ext_shoot_data_t;

//EXT_RFID_STATUS 0x0209
typedef struct
{
	uint32_t rfid_status;
} ext_rfid_status_t;

//EXT_STUDENT_INTERACTIVE_HEADER_DATA 0x0301
typedef struct
{
	uint16_t data_cmd_id;
	uint16_t sender_ID;
	uint16_t receiver_ID;
}ext_student_interactive_header_data_t;

typedef struct
{
	uint8_t *data;
} robot_interactive_data_t;



#endif
